home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 7 / 007.d81 / wind chill (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  8KB  |  256 lines

  1. 100 rem /=============================
  2. 110 rem / wind chill program
  3. 120 rem / presents:
  4. 130 rem /   wind chill factors
  5. 140 rem /   equivalent temps.
  6. 150 rem /   explanations
  7. 160 rem / copyright 1984
  8. 170 rem / robert a. paul
  9. 180 rem /   6 little nook road
  10. 190 rem /   plaistow, nh   03865
  11. 192 rem / translated for the commodore
  12. 194 rem / by donna k. woody
  13. 200 rem /==============================
  14. 210 poke783,peek(783)and254:poke53280,15:poke53281,11:printchr$(5)
  15. 215 printchr$(14):printchr$(8):s=65520
  16. 245 gosub3000
  17. 250 printchr$(147):gosub2020
  18. 260 def fn r(y)=int(y*240+.5)/100
  19. 270 fori=1to40
  20. 280 l$=l$+"#"
  21. 290 nexti
  22. 300 forx=1to40:m$=m$+"-":nextx
  23. 310 printchr$(147):print"[215][201][206][196] [195][200][201][204][204] [198][193][195][212][207][210]"
  24. 320 print:printtab(11)"[197]nglish and [205]etric"
  25. 330 print:printtab(18)"[205]enu"
  26. 340 print
  27. 350 printl$
  28. 360 print
  29. 370 printtab(6)"1.  [198]or entering [197]nglish units"
  30. 380 printtab(10)"([198]ahrenheit & miles per hour)"
  31. 390 print:printtab(6)"2.  [198]or entering [205]etric units"
  32. 400 printtab(10)"([195]elsius & meters per second)":print
  33. 410 printtab(6)"3.  [198]or an explanation and"
  34. 420 printtab(10)"interpretation of the wind"
  35. 430 printtab(10)"chill factor":print
  36. 440 printtab(6)"4.  [212]o quit this program":print
  37. 450 poke781,22:poke782,12:syss:print"[211]election, please: ";
  38. 452 poke198,0:wait198,1:gets$
  39. 455 s1=val(s$)
  40. 460 ifs1<1ors1>4then450
  41. 470 ons1goto490,730,970,2270
  42. 480 printchr$(147):print:print
  43. 489 :
  44. 490 rem / wind chill factor - english
  45. 491 :
  46. 500 printchr$(147)
  47. 510 printtab(3)"[215][201][206][196][160][195][200][201][204][204][160][198][193][195][212][207][210][160][201][206][160][203][201][204][207][195][193][204][207][210][201][197][211]"
  48. 520 printtab(7)"[208][197][210][160][211][209][213][193][210][197][160][205][197][212][197][210][160][208][197][210][160][200][207][213][210]"
  49. 530 print
  50. 540 print"[197]nter wind speed"
  51. 545 input"         in miles per hour: ";v
  52. 550 v=v*.44704
  53. 560 print"[197]nter temperature"
  54. 565 input"         in degrees [198]:      ";t
  55. 570 t=(5/9)*(t-32)
  56. 580 x=sqr(v*240)
  57. 590 a=x-v+10.45
  58. 600 f=a*(33-t)
  59. 610 print:print"[212]he [215]ind [195]hill [198]actor is:  ":print
  60. 620 printtab(4)fn r(f);" kilocalories"
  61. 630 printtab(4)"per square meter per hour."
  62. 640 gosub1900
  63. 650 print:printtab(4)"[211]ensation: "+a$
  64. 660 print:printm$
  65. 680 printtab(7)"1.  [210]epeat more caluclations":print
  66. 690 printtab(7)"2.  [210]eturn to [215]ind [195]hill menu"
  67. 700 poke781,23:poke782,12:syss:print"[211]election, please: ";:
  68. 705 poke198,0:wait198,1:gets$
  69. 707 s1=val(s$)
  70. 710 ifs1<1ors1>2then700
  71. 720 ons1goto490,310
  72. 729 :
  73. 730 rem / wind chill factor -- metric
  74. 731 :
  75. 740 printchr$(147)
  76. 750 printtab(3)"[215][201][206][196][160][195][200][201][204][204][160][198][193][195][212][207][210][160][201][206][160][203][201][204][207][195][193][204][207][210][201][197][211]"
  77. 760 printtab(7)"[208][197][210][160][211][209][213][193][210][197][160][205][197][212][197][210][160][208][197][210][160][200][207][213][210]":print:print
  78. 770 print"[197]nter wind speed"
  79. 780 input"          in meters per second: ";v
  80. 790 print"[197]nter temperature"
  81. 800 input"           in degrees [195]elsius:  ";t
  82. 810 print
  83. 820 x=sqr(v*240)
  84. 830 a=x-v+10.45
  85. 840 f=a*(33-t)
  86. 850 print"[212]he [215]ind [195]hill [198]actor is:"
  87. 860 print:printtab(4)fn r(f);" kilocalories"
  88. 870 printtab(4)"per square meter per hour."
  89. 880 gosub1900
  90. 890 print:printtab(4)"[211]ensation:  "+a$
  91. 900 print:printm$
  92. 910 printtab(7)"1.  [210]epeat more calculations":print
  93. 920 printtab(7)"2.  [210]eturn to [215]ind [195]hill menu"
  94. 930 print
  95. 940 poke781,23:poke782,12:syss:print"[211]election, please: ";
  96. 942 poke198,0:wait198,1:gets$
  97. 945 s1=val(s$)
  98. 950 ifs1<1ors1>2then940
  99. 960 ons1goto730,310
  100. 970 printchr$(147):printtab(7)"[197][216][208][204][193][206][193][212][201][207][206][160]&[160][201][206][212][197][210][208][210][197][212][193][212][201][207][206]":print
  101. 980 printtab(17)"[207][198][160][212][200][197]":print
  102. 990 printtab(11)"[215][201][206][196][160][195][200][201][204][204][160][198][193][195][212][207][210]"
  103. 1000 print:printm$
  104. 1010 print"[194]ecause wind removes the heated layer"
  105. 1020 print"of air near the body, the effect of the"
  106. 1030 print"wind is to reduce the environmental"
  107. 1040 print"temperature to a lower value.  [212]his"
  108. 1050 print"lowered value that we feel is the"
  109. 1060 print"sensible temperature (also called the"
  110. 1070 print"equivalent temperature). [212]he wind chill"
  111. 1080 print"factor ([203]) is a measure of the quantity"
  112. 1090 print"of heat, in kilogram calories ([203][195][193][204])"
  113. 1100 print"that can be lost to the air in one hour"
  114. 1110 print"from an exposed surface of one square"
  115. 1120 print"meter ([203] = [203][195][193][204]/[211][209][213][193][210][197] [205][197][212][197][210]/[200][207][213][210])."
  116. 1130 poke781,23:poke782,7:syss:print"[208]ress any key to continue.";
  117. 1132 poke198,0:wait198,1:geta$:printchr$(147)
  118. 1140 print"[215]ind speeds are in meters per second"
  119. 1150 print"and the dry bulb temperature is in"
  120. 1160 print"degrees [195]elsius.":print
  121. 1170 print"[211]hade is assumed and evaporation is"
  122. 1180 print"disregarded.  [201]t also assumes a neutral"
  123. 1190 print"skin temperature of 33 [195]elsius (91.4 [198])
  124. 1200 [153]"and a constant of 10.45 for cooling by"
  125. 1210 [153]"radiation and conduction."
  126. 1220 [153]
  127. 1230 [153]"(NULL)he following table provides a guide"
  128. 1240 [153]"to the sensations associated with"
  129. 1250 [153]"selected wind chill factors.":[153]
  130. 1260 [153]"atnnother table follows that presents"
  131. 1270 [153]"traditional 'equivalent temperature'"
  132. 1280 [153]"data in ascahrenheit and (NULL).(NULL).left$.":[153]
  133. 1290 [151]781,23:[151]782,4:[158]s:[153]"(NULL)ress any key to see the tables.";
  134. 1295 [151]198,0:[146]198,1:[161]a$
  135. 1300 [153][199](147)
  136. 1310 [153]"(NULL)right$(NULL)str$closelenleft$right$(NULL)(NULL)closeascatnlen(NULL)(NULL)(NULL):  (NULL)val(NULL)(NULL)atn(NULL)right$(NULL)(NULL)closeascval(NULL)(NULL):"
  137. 1320 [153]"---------------------------------------"
  138. 1330 [153]"     2000 (NULL)         ascreezes tissue"
  139. 1340 [153][163]23)"in one minute"
  140. 1350 [153]"     1400 (NULL)";[163]20)"ascreezes exposed skin"
  141. 1360 [153]"     1200 (NULL)";[163]20)"peekitterly cold":[153]
  142. 1370 [153]"     1000 (NULL)";[163]20)"(NULL)ery cold":[153]
  143. 1380 [153]"      800 (NULL)";[163]20)"lenold":[153]
  144. 1390 [153]"      600 (NULL)";[163]20)"(NULL)ery cool":[153]
  145. 1400 [153]"      400 (NULL)";[163]20)"lenool":[153]
  146. 1410 [153]"      200 (NULL)";[163]20)"(NULL)uite pleasant":[153]
  147. 1420 [153]"      100 (NULL)";[163]20)"(NULL)arm":[153]
  148. 1430 [153]"       50 (NULL)";[163]20)"left$ot":[153]
  149. 1440 [153][163]2)"(NULL)ress any key to see an equivalent"
  150. 1450 [153][163]10)"temperature table";:[151]198,0:[146]198,1:[161]a$
  151. 1460 [153][199](147)
  152. 1470 [153]"(NULL)otes on table of equivalent"
  153. 1480 [153]"temperatures that follow:":[153]
  154. 1490 [153]"    (NULL)he first vertical column is for"
  155. 1500 [153]"temperatures in degrees ascahrenheit."
  156. 1510 [153]"(NULL)he first horizontal row presents"
  157. 1520 [153]"selected wind speeds.  (NULL)ero (NULL). (NULL).left$. is"
  158. 1530 [153]"not given because at zero (NULL). (NULL). left$. all"
  159. 1540 [153]"equivalent temperatures are the same"
  160. 1550 [153]"as the actual air temperatures."
  161. 1560 [153]"atn wind speed of 40 (NULL). (NULL). left$. has been"
  162. 1570 [153]"omitted; however, its values would be"
  163. 1580 [153]"found between the narrow range given"
  164. 1590 [153]"for 35 (NULL). (NULL). left$. and 45 (NULL). (NULL). left$.  (NULL)ind"
  165. 1600 [153]"speeds above 45 (NULL). (NULL). left$. are not given"
  166. 1610 [153]"because there is no significant"
  167. 1620 [153]"lowering of the 'sensible' temperature"
  168. 1630 [153]"beyond 45 (NULL). (NULL). left$."
  169. 1640 [153]:[153]
  170. 1650 [151]781,23:[151]782,2:[158]s:[153]"(NULL)ress any key to see the next table."
  171. 1655 [151]198,0:[146]198,1:[161]a$
  172. 1660 [153][199](147)
  173. 1680 [151]781,1:[151]782,0:[158]s:[153]"(NULL)val(NULL)(NULL)))   (NULL)closeright$close(NULL)closevalclose(NULL)    (NULL)closevalclose(NULL)    left$ (NULL)close(NULL)close(NULL):"
  174. 1690 [153]" asc.)) 5  10  15  20close  25   30   35   45"
  175. 1700 [153]"---))----------------------------------"
  176. 1710 [153]" 50) 48  40  36  32   30   28   27   26"
  177. 1720 [153]" 40) 37